Filesystem Vault Provider

NuGet Package : Nodsoft.MoltenObsidian.Vaults.FileSystem

Description

This provider supports the classic/vanilla way of loading an Obsidian vault, which is through the filesystem. By targeting a directory, you can serve a Molten Obsidian vault from it, independently of that vault being initialised through Obsidian first, or not.

Example Usage

Declare a Filesystem vault in Dependency Injection:

using Microsoft.Extensions.DependencyInjection; 

public void ConfigureServices(IServiceCollection services) 
{ 
	// Declare a FileSystem vault from path:
	services.AddMoltenObsidianFileSystemVault(new DirectoryInfo("/path/to/vault"));
	
	// Alternatively you can declare from an IServiceProvider delegate, returning a path.
	services.AddMoltenObsidianFileSystemVault(s => s.GetRequiredService<IMyService>().GetVaultDirectory());
}

Alternatively you can instantiate your own Filesystem vault like so:

using Nodsoft.MoltenObsidian.Vaults.FileSystem;

IVault vault = FileSystemVault.FromDirectory("/path/to/vault");

Known Limitations (Potential future features?)

If any of those features are considered a necessity in your use case, feel free to voice your need by raising an issue.